#ifndef __QUEUELINK_H_
#define __QUEUELINK_H_
#include <stdio.h>
#include <stdlib.h>
#define ERROR_CHECK(ret, num, msg) \
    {                              \
        if (ret == num)            \
        {                          \
            perror(msg);           \
            exit(1);               \
        }                          \
    }
typedef char type;
typedef struct queueLink
{
    type data;
    struct queueLink *next;
} QL;
typedef struct que
{
    QL *front;
    QL *rear;
} QUEUE;
/**
 * @brief Create a Queue Link object
 *
 * @return QUEUE*
 */
QUEUE *createQueueLink();
/**
 * @brief
 *
 * @param qlink
 * @param val
 */
void enQueue(QUEUE *qlink, type val);
/**
 * @brief
 *
 * @param qlink
 * @return type
 */
type deQueue(QUEUE *qlink);
/**
 * @brief
 *
 * @param qlink
 * @return int
 */
int isEmpty(QUEUE *qlink);
void freeQueue(QUEUE **qlink);
void init(QUEUE *qlink);
#endif
